﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CinemaBookingProject.DBLayer;

public class CtrCinemaRoom
{
    private DBCinemaRoom dbcin = new DBCinemaRoom();

    public CinemaRoom Read(int id)
    {
        return dbcin.Read(id);
    }

    public List<CinemaRoom> ReadAll()
    {
        return dbcin.ReadAll();
    }

    public int Insert(CinemaRoom room)
    {
        return dbcin.Insert(room);
    }

    public int Update(CinemaRoom room)
    {
        return dbcin.Update(room);
    }
    public int Delete(int id)
    {
        return dbcin.Delete(id);
    }
    public CinemaRoom CinemaRoomObject(int id, string screen, int maxSeats, int maxLengthSeats, List<Seat> seats, List<ShowTime> shows, int amount)
    {
        CinemaRoom room = new CinemaRoom(id, screen, maxSeats, maxLengthSeats);
        room.Seats = seats;
        room.Shows = shows;
        room.AmountOfBookings = amount;
        return room;
    }
}

